#ifndef __ALARM_H__
#define __ALARM_H__

#include "common.h"

#define MAX_ALARM_COUNT 32

struct user_socket;

typedef struct _device_alarm{
    int* p_value;
    int report_value;
    char value_string[64];
    char value_name[32];
    char device[16];
}device_alarm;

typedef struct _device_alarm_list{
    device_alarm alarms[MAX_ALARM_COUNT];
    int index;
}device_alarm_list;

void init_alarm();
void alram_info_register(device_alarm_list* p_list,int* p_value,char* value_string,char* value_name,char* device);
void scan_alarm(void* param);
cJSON* alarm_parse(CMD_ID id,cJSON* param);
#endif // !__ALARM_H__
